package com.sree.tali.dao.homepage.impl;

import com.sree.tali.hibernate.pojo.HomePojo;
import com.sree.tali.pojo.AdminHomepojo;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class UploadHomeDAO
  implements IUploadHomeDao
{
  public void save(AdminHomepojo paramAdminHomepojo, Session paramSession)
  {
    Transaction localTransaction = paramSession.beginTransaction();
    try
    {
      paramSession.save(paramAdminHomepojo);
      localTransaction.commit();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      localTransaction.rollback();
    }
  }
  
  public AdminHomepojo load(int paramInt, Session paramSession)
  {
    Transaction localTransaction = paramSession.beginTransaction();
    AdminHomepojo localAdminHomepojo = null;
    Object localObject = null;
    try
    {
      localAdminHomepojo = (AdminHomepojo)paramSession.createQuery("from fileUploadForm where id=" + paramInt).list();
    }
    catch (Exception localException)
    {
      localTransaction.rollback();
    }
    return localAdminHomepojo;
  }
  
  /*public void remove(HomePojo paramHomePojo)
  {
    Object localObject = null;
    Session localSession = localObject.openSession();
    Transaction localTransaction = localSession.beginTransaction();
    List localList = null;
    try
    {
      localList = localSession.createQuery("delete HomePojo where RecId='' and type=''").list();
      localTransaction.commit();
    }
    catch (Exception localException)
    {
      localTransaction.rollback();
    }
  }
  */
  public AdminHomepojo DisplayHome(Session paramSession)
  {
    Transaction localTransaction = paramSession.beginTransaction();
    AdminHomepojo localAdminHomepojo = null;
    Object localObject = null;
    try
    {
      localAdminHomepojo = (AdminHomepojo)paramSession.createQuery("from fileUploadForm where id=").list();
    }
    catch (Exception localException)
    {
      localTransaction.rollback();
    }
    return localAdminHomepojo;
  }
}


/* Location:           D:\sreenu\talivud-new-110514\talivud-new\dist\WEB-INF\classes\
 * Qualified Name:     com.sree.tali.dao.homepage.impl.UploadHomeDAO
 * JD-Core Version:    0.7.0.1
 */